﻿<UserControl x:Class="Jib.Testbed.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:jib="clr-namespace:Jib.Controls.DataGrid;assembly=Jib.Controls"
    xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"          
    xmlns:local="clr-namespace:Jib.Testbed"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
    <UserControl.Resources>
        <local:CurrencyConverter x:Key="currencyConverter" />
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="35" />
        </Grid.RowDefinitions>
        <sdk:DataPager HorizontalContentAlignment="Center" x:Name="myPager" Source="{Binding Path=ItemsSource, ElementName=grid}" PageSize="50" Grid.Row="1" />

    <jib:JibGrid AutoGenerateColumns="False"  Name="grid" Margin="0,7,0,0" Grid.Row="0">
       
        
        <sdk:DataGrid.Columns>
            <sdk:DataGridTextColumn  Header="Contact Name" Binding="{Binding ContactName}" ></sdk:DataGridTextColumn>
            <sdk:DataGridTextColumn  Header="Title" Binding="{Binding ContactTitle}" ></sdk:DataGridTextColumn>
            <sdk:DataGridTextColumn  Header="Company" Binding="{Binding CompanyName}" ></sdk:DataGridTextColumn>
            <sdk:DataGridTextColumn  Header="Phone" Binding="{Binding Phone}" ></sdk:DataGridTextColumn>
            <sdk:DataGridTextColumn  Header="PostalCode" Binding="{Binding PostalCode}" ></sdk:DataGridTextColumn>
            <sdk:DataGridTextColumn  Header="Amount" Binding="{Binding Amount,Converter={StaticResource currencyConverter}}" ></sdk:DataGridTextColumn>
            <sdk:DataGridTextColumn  Header="Active" Binding="{Binding IsActive}" ></sdk:DataGridTextColumn>
            <sdk:DataGridTextColumn  Header="Region" Binding="{Binding Region}" ></sdk:DataGridTextColumn>
        </sdk:DataGrid.Columns>

    </jib:JibGrid>
    </Grid>
</UserControl>
